package com.mzw.huaxiarealestatebackend.service.impl;

import com.mzw.huaxiarealestatebackend.entity.UserRole;
import com.mzw.huaxiarealestatebackend.dao.UserRoleDao;
import com.mzw.huaxiarealestatebackend.service.UserRoleService;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;

import javax.annotation.Resource;

/**
 * (UserRole)表服务实现类
 *
 * @author makejava
 * @since 2024-01-02 09:25:18
 */
@Service("userRoleService")
public class UserRoleServiceImpl implements UserRoleService {
    @Resource
    private UserRoleDao userRoleDao;

    /**
     * 根据用户身份名称进行查询
     * @param userRoleName
     * @return
     */
    @Override
    public UserRole queryByUserRoleName(String userRoleName) {
        UserRole userRole = this.userRoleDao.queryByUserRoleName(userRoleName);
        return userRole;
    }

    /**
     * 通过ID查询单条数据
     *
     * @param userRoleId 主键
     * @return 实例对象
     */
    @Override
    public UserRole queryById(String userRoleId) {
        return this.userRoleDao.queryById(userRoleId);
    }
}
